﻿@page "/docs/services/message"
@page "/docs/services/message-provider"

<Seo Canonical="/docs/services/message-provider" Title="Blazorise Message service" Description="The IMessageService is a powerful helper utility built on top of Modal component and is used for showing the messages and confirmation dialogs to the user." />

<DocsPageTitle Path="Services/Message">
    Blazorise Message service
</DocsPageTitle>

<DocsPageLead>
    Message service is used for quick user confirmation actions.
</DocsPageLead>

<DocsPageParagraph>
    The <Code>IMessageService</Code> is a powerful helper utility built on top of <Code>Modal</Code> component
    and is used for showing the messages and confirmation dialogs to the user.
</DocsPageParagraph>

<DocsPageSubtitle>
    Quick Setup
</DocsPageSubtitle>

<DocsPageParagraph>
    To install and use Message service you only need to define one simple thing.
</DocsPageParagraph>

<DocsPageSection>
    <DocsPageSectionHeader Title="Step 1. Define wrapper component">
        <Code>IMessageService</Code> is automatically registered by Blazorise but it needs just one thing on
        your side to make it work. You need to place <Code Tag>MessageProvider</Code> somewhere in your application
        razor code. It can be placed anywhere, but a good approach is to place it in <Code>App.razor</Code> like in
        the following example.
    </DocsPageSectionHeader>
    <DocsPageSectionSource Code="MessageServiceUsageExample" />
</DocsPageSection>

<DocsPageSubtitle>
    Examples
</DocsPageSubtitle>

<DocsPageSection>
    <DocsPageSectionHeader Title="Basic">
    </DocsPageSectionHeader>
    <DocsPageSectionContent Outlined>
        <BasicMessageServiceExample />
    </DocsPageSectionContent>
    <DocsPageSectionSource Code="BasicMessageServiceExample" />
</DocsPageSection>